package com.chwn.curiousdiary.ui.story.activity;

import android.os.Bundle;
import android.view.View;

import com.chwn.curiousdiary.R;
import com.chwn.curiousdiary.gloable.Constant;
import com.chwn.curiousdiary.ui.story.fragment.NewCommendFragment;
import com.chwn.harulib.base.BaseActivity;
import com.gyf.barlibrary.ImmersionBar;

import butterknife.OnClick;

/**
 * Created by Myshikin on 2017/3/28.
 */

public class StoryTypeActivity extends BaseActivity {



    @Override
    protected int getLayoutId() {
        return R.layout.activity_story_type;
    }

    @Override
    protected void initData() {
        super.initData();
    }

    @Override
    protected void initView() {
        initnavigationBarColor(-1);
        NewCommendFragment storyTypeFragment = new NewCommendFragment();
        Bundle args = new Bundle();
        args.putCharSequence(Constant.STORY_TYPE, getIntent().getStringExtra(Constant.JUMP_TYPE));
        args.putCharSequence(Constant.STORY_LIST, getIntent().getStringExtra(Constant.STORY_LIST));
        storyTypeFragment.setArguments(args);
        storyTypeFragment.setLoadDataNow(true);
        getSupportFragmentManager()
                .beginTransaction()
                .replace(R.id.fl_content, storyTypeFragment)
                .commit();

        setTitleText(getIntent().getStringExtra(Constant.STORY_LIST));

    }

    @OnClick({ R.id.ib_back})
    public void onClick(View view) {
        switch (view.getId()) {
            case R.id.ib_enter_play:

                break;
            case R.id.ib_back:
                finish();
                break;
        }
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
        ImmersionBar.with(this).destroy();
    }
}
